<template>
  <div>
    <el-tabs v-model="activeName" @tab-click="itemclickdata">
      <el-tab-pane
        :label="item.text"
        :name="item.id"
        v-for="(item,index) in activeItemList"
        :key="index"
      >
        <div v-if="item.id==23">
          <!-- <div style="float:right;margin-right:20px">
            <el-button type="primary" icon="el-icon-s-data" @click="dataanalysis"></el-button>
            <el-button type="primary" icon="el-icon-search" @click="appointmentseach"></el-button>
            <el-button type="primary" icon="el-icon-document" @click="handleseach1"></el-button>
          </div> -->
          <!-- <div class="section10 flex-col">
            <div class="mod2 flex-row">
              <span
                v-for="(item,index) in options"
                :class="current==item.id?'optionitems':'optionitem'"
                @click="chaged(item.id,1,10)"
                :key="index"
              >{{item.text}}</span>
            </div>
          </div> -->
            <div style="float:right;margin-right:20px;">
              <el-button type="primary" icon="el-icon-s-data" @click="dataanalysis"></el-button>
              <el-button type="primary" icon="el-icon-search" @click="appointmentseach"></el-button>
              <el-button type="primary" icon="el-icon-document" @click="handleseachs"></el-button>
            </div>
            <el-table
            id="Table1"
              border
              :data="tableData"
              style="width: 100%"
              :default-sort="{prop: 'date', order: 'descending'}"
            >
              <el-table-column prop="nickname" label="用户昵称"></el-table-column>
              <el-table-column prop="order_id" label="订单编号"></el-table-column>
              <el-table-column prop="phone" label="用户手机号"></el-table-column>
              <el-table-column prop="transaction_id" label="商户订单号"></el-table-column>
              <el-table-column prop="order_time" label="下单日期" sortable></el-table-column>
              <el-table-column prop="store_name" label="门店"></el-table-column>
              <el-table-column prop="seat_number" label="座位"></el-table-column>
              <el-table-column prop="price" label="金额" sortable></el-table-column>
              <el-table-column label="支付类型">
                <template slot-scope="scope">
                  <span v-if="scope.row.type==1">微信支付</span>
                  <span v-if="scope.row.type==2">储值卡支付</span>
                  <span v-if="scope.row.type==3">后台添加</span>
                </template>
              </el-table-column>
              <el-table-column label="预约时间">
                <template slot-scope="scope">
                  {{scope.row.start_sub}} -
                  {{scope.row.end_sub}}
                </template>
              </el-table-column>
              <el-table-column prop="status" label="订单状态">
                <template slot-scope="scope">
                  <div>
                    <span v-if="scope.row.status==1">待支付</span>
                    <span v-if="scope.row.status==2">已支付</span>
                    <span v-if="scope.row.status==3">已使用</span>
                    <span v-if="scope.row.status==4">已退款</span>
                    <span v-if="scope.row.status==5">取消订单</span>
                    <span v-if="scope.row.status==6">已完成</span>
                    <span v-if="scope.row.status==7">提前结束</span>
                    <span v-if="scope.row.status==8">签退</span>
                    <span v-if="scope.row.status==11">超时关闭</span>
                  </div>
                </template>
              </el-table-column>
              <el-table-column label="操作" width="300">
                <template slot-scope="scope">
                  <el-button
                    :disabled="scope.row.status==2||scope.row.status==11||scope.row.status==8||scope.row.status==7||scope.row.status==4||scope.row.status==1||scope.row.status==5||scope.row.status==6"
                    @click.native.prevent="beforestop(scope.row)"
                    type="text"
                  >提前结束</el-button>
                  <el-button
                    :disabled="scope.row.status==11||scope.row.status==8||scope.row.status==7||scope.row.status==4||scope.row.status==1||scope.row.status==5||scope.row.status==6"
                    @click.native.prevent="aloneorder(scope.row)"
                    type="text"
                  >延长订单</el-button>
                  <el-button
                    :disabled="scope.row.status==11||scope.row.status==8||scope.row.status==7||scope.row.status==4||scope.row.status==1||scope.row.status==5||scope.row.status==6"
                    @click.native.prevent="cancelorder(scope.row)"
                    type="text"
                  >取消订单</el-button>
                  <el-button
                    :disabled="scope.row.status==11||scope.row.status==8||scope.row.status==7||scope.row.status==4||scope.row.status==1||scope.row.status==5||scope.row.status==6"
                    @click.native.prevent="logon(scope.row)"
                    type="text"
                  >签退</el-button>
                </template>
              </el-table-column>
            </el-table>
            <div style="width:100%;text-align:center;margin:50px auto;">
              <el-pagination
                background
                :page-size="10"
                :page-sizes="[10, 20, 50, 100]"
                 layout="total,prev, sizes, pager, next, jumper"
                :total="totle"
                  @size-change="handleSizeChange1"
                @current-change="fenyeBtn1"
              ></el-pagination>
            </div>
        </div>
        <div v-if="item.id==24">
          <div style="float:right;margin-right:20px;">
            <el-button type="primary" icon="el-icon-s-data" @click="dataanalysis"></el-button>
            <el-button type="primary" icon="el-icon-search" @click="appointmentseach1"></el-button>
            <el-button type="primary" icon="el-icon-document" @click="handleseach1"></el-button>
          </div>
            <el-table
            id="Table2"
              border
              :data="tableData2"
              style="width: 100%"
              :default-sort="{prop: 'date', order: 'descending'}"
            >
              <el-table-column prop="nickname" label="用户昵称"></el-table-column>
              <el-table-column prop="order_no" label="订单编号"></el-table-column>
              <el-table-column prop="phone" label="用户手机号"></el-table-column>
              <el-table-column prop="transaction_id" label="商户订单号"></el-table-column>
              <el-table-column prop="add_time" label="下单日期" sortable></el-table-column>
              <el-table-column prop="room_name" label="订单名称"></el-table-column>
              <el-table-column prop="store_name" label="门店名称"></el-table-column>
              <el-table-column prop="money" label="订单总金额"></el-table-column>
              <el-table-column prop="order_status" label="订单状态">
                <template slot-scope="scope" style="display:flex;align-items: center;">
                  <span v-if="scope.row.order_status==1">待支付</span>
                  <span v-if="scope.row.order_status==2">已支付</span>
                  <span v-if="scope.row.order_status==3">已使用</span>
                  <span v-if="scope.row.order_status==4">已退款</span>
                  <span v-if="scope.row.order_status==5">取消订单</span>
                  <span v-if="scope.row.order_status==6">已完成</span>
                  <span v-if="scope.row.order_status==7">提前结束</span>
                  <span v-if="scope.row.order_status==8">签退</span>
                  <span v-if="scope.row.order_status==11">超时关闭</span>
                </template>
              </el-table-column>
              <el-table-column label="支付类型">
                <template slot-scope="scope">
                  <span v-if="scope.row.order_type==1">微信支付</span>
                  <span v-if="scope.row.order_type==2">储值卡支付</span>
                  <span v-if="scope.row.order_type==3">后台添加</span>
                </template>
              </el-table-column>
              <el-table-column prop="" label="使用时间">
                <template slot-scope="scope" style="display:flex;align-items: center;">
                  <span>{{scope.row.start_time}}</span>—<span>{{scope.row.end_time}}</span>
                </template>
              </el-table-column>
              <el-table-column prop="order_time" width="200px" label="新增时间"></el-table-column>
              <el-table-column label="操作" width="300px">
                <template slot-scope="scope">
                  <!-- <el-button
                  :disabled="scope.row.order_status==2||scope.row.order_status==11||scope.row.order_status==8||scope.row.order_status==7||scope.row.order_status==4||scope.row.order_status==1||scope.row.order_status==5||scope.row.order_status==6"
                    @click.native.prevent="bindstall(scope.row)"
                    type="text"
                  >提前结束</el-button> -->
                  <el-button
                  :disabled="scope.row.order_status==11||scope.row.order_status==8||scope.row.order_status==7||scope.row.order_status==4||scope.row.order_status==1||scope.row.order_status==5||scope.row.order_status==6"
                    @click.native.prevent="extendedorder(scope.row)"
                    type="text"
                  >修改订单时间</el-button>
                  <el-button
                  :disabled="scope.row.order_status==11||scope.row.order_status==8||scope.row.order_status==7||scope.row.order_status==4||scope.row.order_status==1||scope.row.order_status==5||scope.row.order_status==6"
                    @click.native.prevent="cancelstall(scope.row)"
                    type="text"
                  >取消订单</el-button>
                  <el-button
                  :disabled="scope.row.order_status==11||scope.row.order_status==8||scope.row.order_status==7||scope.row.order_status==4||scope.row.order_status==1||scope.row.order_status==5||scope.row.order_status==6"
                    @click.native.prevent="signout(scope.row)"
                    type="text"
                  >签退</el-button>
                </template>
              </el-table-column>
            </el-table>
             <div style="width:100%;text-align:center;margin:50px auto;">
              <el-pagination
                background
                :page-size="10"
                @current-change="fenyeBtn2s"
                :page-sizes="[10, 20, 50, 100]"
                 layout="total,prev, sizes, pager, next, jumper"
                :total="totle2s"
                  @size-change="handleSizeChange2s"
              ></el-pagination>
            </div>
        </div>
        <div v-if="item.id==25">
          <div style="float:right;margin-right:20px">
            <el-button type="primary" icon="el-icon-search" @click="controlhandleseach"></el-button>
          </div>
          <el-table border :data="doortableData" style="width: 100%">
            <el-table-column prop="create_time" label="时间"></el-table-column>
            <!-- <el-table-column prop="status" label="座位"></el-table-column> -->
            <el-table-column prop="nickname" label="用户"></el-table-column>
            <el-table-column prop="status" label="开锁结果">
              <template slot-scope="scope">{{scope.row.status==1?'开锁成功':'开锁失败'}}</template>
            </el-table-column>
            <el-table-column prop="phone" label="用户手机号"></el-table-column>
          </el-table>
           <div style="width:100%;text-align:center;margin:50px auto;">
              <el-pagination
                background
                :page-size="10"
                @current-change="fenyeBtn2"
                :page-sizes="[10, 20, 50, 100]"
                 layout="total,prev, sizes, pager, next, jumper"
                :total="totle2"
                  @size-change="handleSizeChange2"
              ></el-pagination>
            </div>
        </div>
        <div v-if="item.id==26">
          <div style="float:right;margin-right:20px">
            <el-button type="primary" icon="el-icon-search" @click="operationsearch"></el-button>
          </div>
          <el-table border :data="operationtableData" style="width: 100%">
            <el-table-column prop="create_time" label="时间"></el-table-column>
            <el-table-column prop="nickname" label="用户"></el-table-column>
            <el-table-column prop="desc" label="操作"></el-table-column>
            <el-table-column prop="ip" label="IP地址"></el-table-column>
          </el-table>
          <div style="width:100%;text-align:center;margin:50px auto;">
              <el-pagination
                background
                :page-size="10"
                :page-sizes="[10, 20, 50, 100]"
                 layout="total,prev, sizes, pager, next, jumper"
                  @size-change="handleSizeChange3"
                :total="totle3"
                @current-change="fenyeBtn3"
              ></el-pagination>
            </div>
        </div>
        <div v-if="item.id==27">
          <div style="float:right;margin-right:20px">
            <el-button type="primary" icon="el-icon-s-data" @click="dataanalysis1"></el-button>
            <el-button type="primary" icon="el-icon-search" @click="consumptionment"></el-button>
            <el-button type="primary" icon="el-icon-document" @click="handleseach2"></el-button>
          </div>
          <el-table id="Table4" :data="consumptiontableData" style="width: 100%">
            <el-table-column prop="order_time" label="日期"></el-table-column>
            <el-table-column prop="type" label="类型">
              <template slot-scope="scope">{{scope.row.type==1?'微信':'后台添加'}}</template>
            </el-table-column>
            <el-table-column label="金额">
              <el-table-column prop="before_money" label="变动前"></el-table-column>
              <el-table-column prop="change" label="变更"></el-table-column>
              <el-table-column prop="after_money" label="变更后"></el-table-column>
            </el-table-column>
            <el-table-column prop="pay" label="微信支付"></el-table-column>
            <el-table-column prop="comment" label="大众点评"></el-table-column>
            <el-table-column prop="title" label="套餐"></el-table-column>
            <el-table-column prop="store_name" label="门店"></el-table-column>
            <el-table-column prop="status" label="订单状态">
              <template slot-scope="scope" style="display:flex;align-items: center;">
                <img
                  src="../../../assets/img/dui.png"
                  v-if="scope.row.status==2"
                  style="width:14px;height:14px;margin-right:6px;"
                  alt
                />
                <img
                  src="../../../assets/img/error.png"
                  v-if="scope.row.status==1"
                  style="width:14px;height:14px;margin-right:6px;"
                  alt
                />
                <span v-if="scope.row.status==0">待支付</span>
                <span v-if="scope.row.status==2">交易成功</span>
                <span v-if="scope.row.status==1">交易失败</span>
              </template>
            </el-table-column>
            <el-table-column prop="nickname" label="用户"></el-table-column>
          </el-table>
           <div style="width:100%;text-align:center;margin:50px auto;">
              <el-pagination
                background
                :page-size="10"
                :page-sizes="[10, 20, 50, 100]"
                 layout="total,prev, sizes, pager, next, jumper"
                  @size-change="handleSizeChange4"
                :total="totle4"
                @current-change="fenyeBtn4"
              ></el-pagination>
            </div>
        </div>
        <div v-if="item.id==28">
          <div style="float:right;margin-right:20px">
            <el-button type="primary" icon="el-icon-s-data" @click="rechargeanalysis"></el-button> 
            <!-- <el-button type="primary" icon="el-icon-s-data" @click="dataanalysis2"></el-button> -->
            <el-button type="primary" icon="el-icon-search" @click="rechargesearch"></el-button>
            <el-button type="primary" icon="el-icon-document" @click="handleseach3"></el-button>
          </div>
          <el-table id="Table5" :data="rechargetableData" border style="width: 100%">
            <el-table-column prop="create_time" label="日期"></el-table-column>
            <el-table-column prop="type" label="支付方式">
              <template slot-scope="scope">{{scope.row.type==1?'微信':'储值卡'}}</template>
            </el-table-column>
            <!-- <el-table-column prop="recharge" label="充值金额"></el-table-column> -->
            <el-table-column prop="give" label="赠送金额"></el-table-column>
            <el-table-column prop="pay_money" label="支付金额"></el-table-column>
            <el-table-column prop="desc" label="备注"></el-table-column>
            <el-table-column prop="term" label="有效期至"></el-table-column>
            <el-table-column prop="store_name" label="门店"></el-table-column>
            <el-table-column prop="status" label="订单状态">
              <template slot-scope="scope" style="display:flex;align-items: center;">
                <img
                  src="../../../assets/img/dui.png"
                  v-if="scope.row.status==2"
                  style="width:14px;height:14px;margin-right:6px;"
                  alt
                />
                <img
                  src="../../../assets/img/error.png"
                  v-else
                  style="width:14px;height:14px;margin-right:6px;"
                  alt
                />
                <span v-if="scope.row.status==2">交易成功</span>
                <span v-else>交易失败</span>
              </template>
            </el-table-column>
            <el-table-column prop="nickname" label="用户"></el-table-column>
          </el-table>
          <div style="width:100%;text-align:center;margin:50px auto;">
              <el-pagination
                background
                :page-size="10"
                :page-sizes="[10, 20, 50, 100]"
                 layout="total,prev, sizes, pager, next, jumper"
                  @size-change="handleSizeChange5"
                :total="totle5"
                @current-change="fenyeBtn5"
              ></el-pagination>
            </div>
        </div>
        <div v-if="item.id==29">
          <div style="float:right;margin-right:20px">
            <el-button type="primary" icon="el-icon-search" @click="mealsearch"></el-button>
            <el-button type="primary" icon="el-icon-document" @click="handleseach4"></el-button>
          </div>
          <el-table id="Table6" :data="mealtableData" border style="width: 100%">
            <el-table-column prop="username" label="用户昵称"></el-table-column>
            <el-table-column prop="phone" label="用户手机号"></el-table-column>
            <el-table-column prop="transaction_id" label="商户订单号"></el-table-column>
            <el-table-column prop="create_time" label="开始日期"></el-table-column>
            <el-table-column prop="end_time" label="结束日期"></el-table-column>
            <el-table-column prop="card_name" label="类型"></el-table-column>
            <el-table-column prop="type_name" label="套餐"></el-table-column>
            <el-table-column prop="name" label="可用门店" show-overflow-tooltip>
              <template slot-scope="scope">
                <span
                  size="mini"
                  style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis;"
                  v-for="(item,index) in scope.row.name"
                  :key="index"
                >{{scope.row.name.length==1?item.store_name:item.store_name+","}}</span>
              </template>
            </el-table-column>
            <!-- <el-table-column prop="type_name" label="套餐内容"></el-table-column> -->
            <!-- <el-table-column prop="take_effect" label="使用详情"></el-table-column> -->
          </el-table>
          <div style="width:100%;text-align:center;margin:50px auto;">
              <el-pagination
                background
                :page-size="10"
                :page-sizes="[10, 20, 50, 100]"
                 layout="total,prev, sizes, pager, next, jumper"
                  @size-change="handleSizeChange6"
                :total="totle6"
                @current-change="fenyeBtn6"
              ></el-pagination>
            </div>
        </div>
        <div v-if="item.id==30">
          <el-table :data="noticetableData" style="width: 100%">
            <el-table-column prop="nickname" label="姓名">
              <template slot-scope="scope" style="display:flex;align-items: center;">
                <img
                  :src="scope.row.wechat_avatar"
                  style="width:28px;height:28px;margin-right:6px;border-radius: 4px;"
                  alt
                />
                <span>{{scope.row.nickname}}</span>
              </template>
            </el-table-column>
            <el-table-column prop="desc" label="消息"></el-table-column>
            <el-table-column prop="create_time" label="时间"></el-table-column>
          </el-table>
          <div style="width:100%;text-align:center;margin:50px auto;">
              <el-pagination
                background
                :page-size="10"
                :page-sizes="[10, 20, 50, 100]"
                 layout="total,prev, sizes, pager, next, jumper"
                  @size-change="handleSizeChange7"
                :total="totle7"
                @current-change="fenyeBtn7"
              ></el-pagination>
            </div>
        </div>
        <div v-if="item.id==31">
          <div style="float:right;margin-right:20px">
            <el-button type="primary" icon="el-icon-search" @click="guisearch"></el-button>
          </div>
          <el-table :data="lockertableData" border style="width: 100%">
            <el-table-column prop="create_time" label="开柜时间"></el-table-column>
            <el-table-column prop="store_name" label="门店"></el-table-column>
            <el-table-column prop="nickname" label="用户"></el-table-column>
            <el-table-column prop="container" label="货柜编号"></el-table-column>
            <el-table-column prop="equipment" label="设备ID"></el-table-column>
          </el-table>
          <div style="width:100%;text-align:center;margin:50px auto;">
              <el-pagination
                background
                :page-size="10"
                :page-sizes="[10, 20, 50, 100]"
                 layout="total,prev, sizes, pager, next, jumper"
                  @size-change="handleSizeChange8"
                :total="totle8"
                @current-change="fenyeBtn8"
              ></el-pagination>
            </div>
        </div>
      </el-tab-pane>
    </el-tabs>
    <el-dialog title="数据分析" :visible.sync="analysispopup" width="50%">
      <el-table :data="analysisData" :class="analysisData.length==0?'nomolview':'scrview'">
        <el-table-column prop="store_name" label="门店"></el-table-column>
        <el-table-column prop="consume " label="优惠消耗"></el-table-column>
        <el-table-column prop="price" label="微信收入"></el-table-column>
      </el-table>
      <div style="text-align:right">
        <el-button type="primary" @click="analysispopup=false">确定</el-button>
      </div>
    </el-dialog>
    <!-- <el-dialog title="签退" :visible.sync="logonpopup" width="50%">
      <el-form ref="logondata" :model="logondata">
        <el-form-item label="日期" prop="date" label-width="120px">
          <el-time-picker
            v-model="time1"
            :picker-options="{
      selectableRange: '00:00:00 - 23:59:59'
    }"
            placeholder="选择时间"
          ></el-time-picker>
        </el-form-item>
        <el-form-item style="text-align: right;">
          <el-button type="primary" @click="submitFormlogondata()">确定</el-button>
        </el-form-item>
      </el-form>
    </el-dialog>-->
    <el-dialog title="数据搜索" :visible.sync="searchpopup" width="50%">
      <el-form ref="datasearch" :model="datasearch" :rules="rules">
        <el-form-item label="门店" prop="shop" label-width="120px">
          <el-select v-model="datasearch.shop" style="width:50%" clearable placeholder="请选择">
            <el-option
              v-for="item in options1"
              :key="item.id"
              :label="item.store_name"
              :value="item.id"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="下单日期" prop="value1" label-width="120px">
          <el-col :span="10">
          <el-date-picker
            v-model="datasearch.value1"
            type="daterange"
            value-format="yyyy-MM-dd"
            range-separator="至"
            start-placeholder="开始日期"
            end-placeholder="结束日期"
          ></el-date-picker>
          </el-col>
        </el-form-item>
        <el-form-item label="预约日期" prop="value2" label-width="120px">
          <el-col :span="10">
          <el-date-picker
            v-model="datasearch.value2"
            type="daterange"
            value-format="yyyy-MM-dd"
            range-separator="至"
            start-placeholder="开始日期"
            end-placeholder="结束日期"
          ></el-date-picker>
          </el-col>
        </el-form-item>
        <el-form-item label="订单状态" prop="status" label-width="120px">
          <el-select v-model="datasearch.status" clearable style="width:50%" placeholder="请选择">
            <el-option
              v-for="item in options2"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            ></el-option>
          </el-select>
        </el-form-item>
        <!-- <el-form-item label="客户手机" prop="phone" label-width="120px">
          <el-input v-model="datasearch.phone" placeholder="请输入用户手机"></el-input>
        </el-form-item> -->
        <el-form-item style="text-align: right;">
          <el-button @click="resetForm('datasearch')">重置</el-button>
          <el-button type="primary" @click="submitFormdatasearch('datasearch')">确定</el-button>
        </el-form-item>
      </el-form>
    </el-dialog>
    <el-dialog title="数据搜索" :visible.sync="searchpopup1" width="50%">
      <el-form ref="datasearch1" :model="datasearch1" :rules="rules">
        <el-form-item label="门店" prop="shop" label-width="120px">
          <el-select v-model="datasearch1.shop" style="width:50%" clearable placeholder="请选择">
            <el-option
              v-for="item in options1"
              :key="item.id"
              :label="item.store_name"
              :value="item.id"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="日期" prop="value1" label-width="120px">
          <el-col :span="10">
          <el-date-picker
            v-model="datasearch1.value1"
            type="daterange"
            value-format="yyyy-MM-dd"
            range-separator="至"
            start-placeholder="开始日期"
            end-placeholder="结束日期"
          ></el-date-picker>
          </el-col>
        </el-form-item>
        <el-form-item label="订单状态" prop="status" label-width="120px">
          <el-select v-model="datasearch1.status" clearable style="width:50%" placeholder="请选择">
            <el-option
              v-for="item in options2"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            ></el-option>
          </el-select>
        </el-form-item>
        <!-- <el-form-item label="客户手机" prop="phone" label-width="120px">
          <el-input v-model="datasearch1.phone" placeholder="请输入用户手机"></el-input>
        </el-form-item> -->
        <el-form-item style="text-align: right;">
          <el-button @click="resetForm('datasearch1')">重置</el-button>
          <el-button type="primary" @click="submitFormdatasearch1('datasearch1')">确定</el-button>
        </el-form-item>
      </el-form>
    </el-dialog>
    <el-dialog title="数据搜索" :visible.sync="controlsearchpopup" width="50%">
      <el-form ref="controldata" :model="controldata" :rules="rules">
        <!-- <el-form-item label="门店" prop="shop" label-width="120px">
          <el-select v-model="controldata.shop" style="width:50%" clearable placeholder="请选择">
            <el-option
              v-for="item in options1"
              :key="item.id"
              :label="item.store_name"
              :value="item.id"
            ></el-option>
          </el-select>
        </el-form-item> -->
        <el-form-item label="日期" prop="date" label-width="120px">
          <el-date-picker
            v-model="controldata.datevalue"
            style="width:50%"
            type="daterange"
            range-separator="至"
            value-format="yyyy-MM-dd"
            start-placeholder="开始日期"
            end-placeholder="结束日期"
          ></el-date-picker>
        </el-form-item>
        <el-form-item label="客户手机" label-width="120px">
          <el-input v-model="controldata.phone" placeholder="请输入用户手机"></el-input>
        </el-form-item>
        <el-form-item style="text-align: right;">
          <el-button @click="resetForm('controldata')">重置</el-button>
          <el-button type="primary" @click="submitFormcontrolsearchpopup('controldata')">确定</el-button>
        </el-form-item>
      </el-form>
    </el-dialog>
    <el-dialog title="数据搜索" :visible.sync="operationsearchpopup" width="50%">
      <el-form ref="operationdata" :model="operationdata">
        <el-form-item label="用户" prop="user" label-width="120px">
          <el-input v-model="operationdata.user" placeholder="请输入用户名称"></el-input>
          <!-- <el-select v-model="operationdata.user" style="width:100%" placeholder="请选择">
            <el-option
              v-for="item in operationoptions1"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            ></el-option>
          </el-select>-->
        </el-form-item>
        <el-form-item label="日期" prop="date" label-width="120px">
          <el-date-picker
            v-model="operationdata.datevalue"
            type="daterange"
            value-format="yyyy-MM-dd"
            range-separator="至"
            start-placeholder="开始日期"
            end-placeholder="结束日期"
          ></el-date-picker>
        </el-form-item>
        <el-form-item style="text-align: right;">
          <el-button @click="resetForm('operationdata')">重置</el-button>
          <el-button type="primary" @click="submitFormoperationsearchpopup('operationdata')">确定</el-button>
        </el-form-item>
      </el-form>
    </el-dialog>

    <el-dialog title="数据搜索" :visible.sync="consumptionpopup" width="50%">
      <el-form ref="consumptiondata" :model="consumptiondata">
        <el-form-item label="交易类型" prop="type" label-width="120px">
          <el-select v-model="consumptiondata.type" style="width:50%" clearable placeholder="请选择">
            <el-option
              v-for="item in optionstype"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="门店" prop="shop" label-width="120px">
          <el-select v-model="consumptiondata.shop" style="width:50%" clearable placeholder="请选择">
            <el-option
              v-for="item in options1"
              :key="item.id"
              :label="item.store_name"
              :value="item.id"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="日期" prop="date" label-width="120px">
          <el-date-picker
            v-model="consumptiondata.value4"
            style="width:50%"
            type="daterange"
            value-format="yyyy-MM-dd"
            range-separator="至"
            start-placeholder="开始日期"
            end-placeholder="结束日期"
          ></el-date-picker>
        </el-form-item>
        <el-form-item label="交易状态" prop="status" label-width="120px">
          <el-select
            v-model="consumptiondata.status"
            clearable
            style="width:50%"
            placeholder="请选择"
          >
            <el-option
              v-for="item in optionsstatus"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="客户手机" prop="phone" label-width="120px">
          <el-input v-model="consumptiondata.phone" placeholder="请输入用户手机"></el-input>
        </el-form-item>
        <el-form-item style="text-align: right;">
          <el-button @click="resetForm('consumptiondata')">重置</el-button>
          <el-button type="primary" @click="submitFormconsumptiondata('consumptiondata')">确定</el-button>
        </el-form-item>
      </el-form>
    </el-dialog>

    <el-dialog title="数据搜索" :visible.sync="rechargepopup" width="50%">
      <el-form ref="rechargedata" :model="rechargedata">
        <el-form-item label="支付方式" prop="paytype" label-width="120px">
          <el-select v-model="rechargedata.paytype" clearable style="width:50%" placeholder="请选择">
            <el-option
              v-for="item in optionspay"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="门店" prop="store_id" label-width="120px">
          <el-select v-model="rechargedata.store_id" style="width:50%" clearable placeholder="请选择">
            <el-option
              v-for="item in options1"
              :key="item.id"
              :label="item.store_name"
              :value="item.id"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="日期" prop="date" label-width="120px">
          <el-date-picker
            v-model="rechargedata.value5"
            style="width:50%"
            type="daterange"
            value-format="yyyy-MM-dd"
            range-separator="至"
            start-placeholder="开始日期"
            end-placeholder="结束日期"
          ></el-date-picker>
        </el-form-item>
        <el-form-item label="交易状态" prop="status" label-width="120px">
          <el-select v-model="rechargedata.status" clearable style="width:50%" placeholder="请选择">
            <el-option
              v-for="item in optionsstatus"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="客户手机" prop="phone" label-width="120px">
          <el-input v-model="rechargedata.phone" placeholder="请输入用户手机"></el-input>
        </el-form-item>
        <el-form-item style="text-align: right;">
          <el-button @click="resetForm('rechargedata')">重置</el-button>
          <el-button type="primary" @click="submitFormrechargedata('rechargedata')">确定</el-button>
        </el-form-item>
      </el-form>
    </el-dialog>

    <el-dialog title="数据分析" :visible.sync="rechargeanalysispopup" width="50%">
      <el-table :data="rechargeanalysisData" :class="rechargeanalysisData.length==0?'nomolview':'scrview'">
        <el-table-column prop="store_name" label="门店"></el-table-column>
        <el-table-column prop="pay_money " label="后台消费"></el-table-column>
        <el-table-column prop="comment" label="点评收入"></el-table-column>
        <el-table-column prop="wx_money" label="微信收入"></el-table-column>
      </el-table>
      <div style="text-align:right">
        <el-button type="primary" @click="rechargeanalysispopup=false">确定</el-button>
      </div>
    </el-dialog>

    <el-dialog title="数据搜索" :visible.sync="mealpopup" width="50%">
      <el-form ref="mealdata" :model="mealdata">
        <el-form-item label="套餐" prop="mealname" label-width="120px">
          <el-input v-model="mealdata.mealname" placeholder="请输入套餐名称"></el-input>
          <!-- <el-select v-model="mealdata.meal" style="width:100%" placeholder="请选择">
            <el-option
              v-for="item in options2"
              :key="item.value"
              :label="item.label"
              :value="item.value"
            ></el-option>
          </el-select>-->
        </el-form-item>
        <el-form-item label="日期" prop="date" label-width="120px">
          <el-date-picker
            v-model="mealdata.value6"
            type="daterange"
            value-format="yyyy-MM-dd"
            range-separator="至"
            start-placeholder="开始日期"
            end-placeholder="结束日期"
          ></el-date-picker>
        </el-form-item>
        <el-form-item label="有效日期" prop="date" label-width="120px">
          <el-date-picker
            v-model="mealdata.value7"
            type="daterange"
            value-format="yyyy-MM-dd"
            range-separator="至"
            start-placeholder="开始日期"
            end-placeholder="结束日期"
          ></el-date-picker>
        </el-form-item>
        <el-form-item label="客户手机" prop="phone" label-width="120px">
          <el-input v-model="mealdata.phone" placeholder="请输入用户手机"></el-input>
        </el-form-item>
        <el-form-item style="text-align: right;">
          <el-button @click="resetForm('mealdata')">重置</el-button>
          <el-button type="primary" @click="submitFormmealdata('mealdata')">确定</el-button>
        </el-form-item>
      </el-form>
    </el-dialog>

    <el-dialog title="数据搜索" :visible.sync="guipopup" width="50%">
      <el-form ref="guidata" :model="guidata">
        <el-form-item label="门店" prop="shop" label-width="120px">
          <el-select v-model="guidata.shop" style="width:50%" clearable placeholder="请选择">
            <el-option
              v-for="item in options1"
              :key="item.id"
              :label="item.store_name"
              :value="item.id"
            ></el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="日期" prop="date" label-width="120px">
          <el-date-picker
          style="width:50%"
            v-model="guidata.value8"
            type="daterange"
            value-format="yyyy-MM-dd"
            range-separator="至"
            start-placeholder="开始日期"
            end-placeholder="结束日期"
          ></el-date-picker>
        </el-form-item>
        <el-form-item label="客户手机" prop="phone" label-width="120px">
          <el-input v-model="guidata.phone" placeholder="请输入用户手机"></el-input>
        </el-form-item>
        <el-form-item style="text-align: right;">
          <el-button @click="resetForm('guidata')">重置</el-button>
          <el-button type="primary" @click="submitFormguipopup('guidata')">确定</el-button>
        </el-form-item>
      </el-form>
    </el-dialog>

    <el-dialog title="延长订单" :visible.sync="extendedpopup" width="50%">
      <el-form ref="extendeddata" :model="extendeddata" :rules="rules">
        <el-form-item label="座位" prop="seat_number" label-width="180px">
          <span>{{extendeddata.seat_number}}</span>
        </el-form-item>
        <el-form-item label="预约日期" prop="order_time" label-width="180px">
          <span>{{extendeddata.order_time}}</span>
        </el-form-item>
        <el-form-item label="时间" prop="start_sub" label-width="180px">
          <span>{{extendeddata.start_sub}}-{{extendeddata.end_sub}}</span>
        </el-form-item>
        <el-form-item label="延长" label-width="180px">
          <el-input-number v-model="extend" @change="handleChange" :min="1" :max="10" label></el-input-number>
        </el-form-item>
        <el-form-item label="预约用户" prop="nickname" label-width="180px">
          <span>{{extendeddata.nickname}}</span>
        </el-form-item>
        <!-- <div
          style="width:80%;background:#333333;height:1px;margin-left: 50%;transform: translateX(-50%)"
        ></div>
        <div
          style="text-align: right;width:80%;margin-top:16px;margin-left: 50%;transform: translateX(-50%);display:flex;justify-content: flex-end;"
        >修改后费用 239 - 239 =0 还需要支付0元</div>-->
        <el-form-item
          style="text-align: right;width:80%;margin-left: 50%;transform: translateX(-50%);margin-top:50px"
        >
          <el-button type="primary" @click="submitFormextendeddata('extendeddata')">确定</el-button>
        </el-form-item>
      </el-form>
    </el-dialog>
    <el-dialog title="延长订单" :visible.sync="extendedpopups" width="50%">
      <el-form ref="extendeddatas" :model="extendeddatas" :rules="rules">
        <el-form-item label="房间名称" prop="room_name" label-width="180px">
          <span>{{extendeddatas.room_name}}</span>
        </el-form-item>
        <el-form-item label="预约日期" prop="add_time" label-width="180px">
          <span>{{extendeddatas.add_time}}</span>
        </el-form-item>
        <el-form-item label="时间" prop="pay_time" label-width="180px">
          <span>{{extendeddatas.pay_time}}</span>
        </el-form-item>
        <el-form-item label="延长" label-width="180px">
          <el-input-number v-model="extend" @change="handleChanges" :min="1" :max="10" label></el-input-number>
        </el-form-item>
        <el-form-item label="与会人员" prop="nickname" label-width="180px">
          <span>{{extendeddatas.nickname}}</span>
        </el-form-item>
        <!-- <div
          style="width:80%;background:#333333;height:1px;margin-left: 50%;transform: translateX(-50%)"
        ></div>
        <div
          style="text-align: right;width:80%;margin-top:16px;margin-left: 50%;transform: translateX(-50%);display:flex;justify-content: flex-end;"
        >修改后费用 239 - 239 =0 还需要支付0元</div>-->
        <el-form-item
          style="text-align: right;width:80%;margin-left: 50%;transform: translateX(-50%);margin-top:50px"
        >
          <el-button type="primary" @click="submitFormextendeddatas('extendeddatas')">确定</el-button>
        </el-form-item>
      </el-form>
    </el-dialog>
    <el-dialog title="提前结束" :visible.sync="stoppopup" width="50%">
      <el-form ref="stopdata" :model="stopdata" :rules="rules">
        <el-form-item label="座位" prop="seat" label-width="180px">
          <span>{{stopdata.seat_number}}</span>
        </el-form-item>
        <el-form-item label="预约日期" prop="order_time" label-width="180px">
          <span>{{stopdata.order_time}}</span>
        </el-form-item>
        <el-form-item label="时间" prop="start_sub" label-width="180px">
          <span>{{stopdata.start_sub}}-{{stopdata.end_sub}}</span>
        </el-form-item>
        <el-form-item label="预约用户" prop="nickname" label-width="180px">
          <span>{{stopdata.nickname}}</span>
        </el-form-item>
        <!-- <div
          style="width:80%;background:#333333;height:1px;margin-left: 50%;transform: translateX(-50%)"
        ></div>-->
        <!-- <div
          style="text-align: right;width:80%;margin-top:16px;margin-left: 50%;transform: translateX(-50%);display:flex;justify-content: flex-end;"
        >修改后费用 12.00 还需要支付7.50元</div>-->
        <el-form-item
          style="text-align: right;width:80%;margin-left: 50%;transform: translateX(-50%);margin-top:50px"
        >
          <el-button type="primary" @click="submitFormstopdata('stopdata')">确定</el-button>
        </el-form-item>
      </el-form>
    </el-dialog>
    <el-dialog title="提前结束" :visible.sync="stoppopups" width="50%">
      <el-form ref="stopdatas" :model="stopdatas" :rules="rules">
        <el-form-item label="房间名称" prop="room_name" label-width="180px">
          <span>{{stopdatas.room_name}}</span>
        </el-form-item>
        <el-form-item label="预约日期" prop="add_time" label-width="180px">
          <span>{{stopdatas.add_time}}</span>
        </el-form-item>
        <el-form-item label="时间" prop="pay_time" label-width="180px">
          <span>{{stopdatas.pay_time}}</span>
        </el-form-item>
        <el-form-item label="与会人员" prop="nickname" label-width="180px">
          <span>{{stopdatas.nickname}}</span>
        </el-form-item>
        <!-- <div
          style="width:80%;background:#333333;height:1px;margin-left: 50%;transform: translateX(-50%)"
        ></div>-->
        <!-- <div
          style="text-align: right;width:80%;margin-top:16px;margin-left: 50%;transform: translateX(-50%);display:flex;justify-content: flex-end;"
        >修改后费用 12.00 还需要支付7.50元</div>-->
        <el-form-item
          style="text-align: right;width:80%;margin-left: 50%;transform: translateX(-50%);margin-top:50px"
        >
          <el-button type="primary" @click="submitFormstopdatas('stopdatas')">确定</el-button>
        </el-form-item>
      </el-form>
    </el-dialog>
  </div>
</template>

<script>
import { mapGetters } from "vuex";
import {
  sellBusines,
  sellAnalyse,
  sellConference,
  sellEntrance,
  sellOperate,
  sellConsume,
  sellRecharge,
  sellNotice,
  sellLocker,
  sellSetmeal,
  sellConAnalysis,
  sellReaAnalysis,
  sellCancel,
  sellExtend,
  sellSignout,
  sellEnd,
  roomEnd,
  roomExtend,
  roomCancel,
  roomConference
} from "@/api/user";
import { adminStore } from "@/api/menu";
import { getp_id } from "@/utils/getmenuid";
import Base64 from "@/utils/base";
import * as FileSaver from 'file-saver'
import * as XLSX from 'xlsx'
export default {
  name: "Dashboard",
  computed: {
    ...mapGetters(["name"])
  },
  components: {
    Map
  },
  computed: {
    activeItemList() {
      return this.itemdata.filter(item => {
        return item.id
      });
    }
  },
  data() {
    return {
      queryObj:{},
      queryObj2s:{},
      queryObj2:{},
      queryObj3:{},
      queryObj4:{},
      longtime1:1,
      longtime2:1,
      totle: 10,
      page1: 1,
      num1:10,
      num2s:10,
      num2:10,
      num3:10,
      num4:10,
      num5:10,
      num6:10,
      num7:10,
      num8:10,
      totle2s:10,
      page2s:1,
      totle2:10,
      page2:1,
      totle3:10,
      page3:1,
      totle4:10,
      page4:1,
      totle5:10,
      page5:1,
      totle6:10,
      page6:1,
      totle7:10,
      page7:1,
      totle8:10,
      page8:1,
      extend: 1,
      istsd:true,
      rules: {
        // phone: [{ required: true, message: "请输入手机号", trigger: "change" }]
      },
      datasearch: {
        shop: "",
        status:"",
        value1:"",
        value2:""
      },
      datasearch1: {
        shop: "",
        status:"",
        value1:""
      },
      controldata: {
        // shop: "",
        datevalue: "",
        phone:""
      },
      guidata: {
        shop: "",
        value8: "",
        phone:""
      },
      operationdata: {
        user: "",
        datevalue:""
      },
      consumptiondata: {
        shop: "",
        type:"",
        status:"",
        phone:"",
        value4: "",
      },
      rechargedata: {
        store_id:"",
        value5:"",
        paytype:"",
        status:"",
        phone:""
      },
      // logondata: {},
      analysisData: [],
      rechargeanalysisData: [],
      mealdata: {
        value6:"",
        value7: "",
        mealname:"",
        phone:""
      },
      value1: "",
      value3: "",
      time1: "",
      options1: "",
      //交易状态
      optionsstatus: [
        {
          value: "1",
          label: "交易失败"
        },
        {
          value: "2",
          label: "交易成功"
        }
      ],
      optionstype: [
        {
          value: "1",
          label: "微信"
        },
        {
          value: "2",
          label: "后台添加"
        }
      ],
      optionspay: [
        {
          value: "1",
          label: "微信"
        }
      ],
      options2: [
        {
          value: "1",
          label: "待支付"
        },
        {
          value: "2",
          label: "已支付"
        },
        {
          value: "3",
          label: "已使用"
        },
        {
          value: "4",
          label: "已退款"
        },
        {
          value: "5",
          label: "取消订单"
        },
        {
          value: "6",
          label: "已完成"
        },
        {
          value: "7",
          label: "提前结束"
        },
        {
          value: "8",
          label: "签退"
        },
        {
          value: "11",
          label: "超时关闭"
        }
      ],
      extendeddata: "",
      extendeddatas: "",
      stopdata: "",
      stopdatas: "",
      extendedpopup: false,
      extendedpopups: false,
      stoppopup: false,
      stoppopups: false,
      searchpopup: false,
      searchpopup1: false,
      controlsearchpopup: false,
      consumptionpopup: false,
      rechargepopup: false,
      operationsearchpopup: false,
      analysispopup: false,
      rechargeanalysispopup: false,
      mealpopup: false,
      // logonpopup: false,
      guipopup: false,
      tableData2: [],
      doortableData: "",
      operationtableData: [],
      consumptiontableData: [],
      rechargetableData: [],
      mealtableData: [],
      noticetableData: [],
      lockertableData: [],
      tableData: [],
      activeName: "23",
      itemdata: [],
      id1:"",
      id2:"",
      current: 23,
      options: [],
      btnarr: [],
      btnclass: "",
      btntit: "",
      btnpid: "",
      pagetitle: [],
      pid: [],
      bools:false
    };
  },
  created() {
    this.getadminstore();
    setTimeout(() => {
      this.btnarr = JSON.parse(localStorage.getItem("btnmodel"))[0].btnarr;
      this.pagetitle = JSON.parse(
        localStorage.getItem("btnmodel")
      )[0].pagetitle;
      this.pid = JSON.parse(localStorage.getItem("btnmodel"))[0].pid;
      let alldata = [];
      let options = [];
      this.current = this.pid[0];
      this.activeName = String(this.pid[0]);
      for (let i = 0; i < this.pagetitle.length; i++) {
        alldata.push({
          text: this.pagetitle[i],
          id: String(this.pid[i])
        });
      }
      for (let i = 0; i < 2; i++) {
        options.push({
          id: this.pid[i],
          text: this.pagetitle[i]
        });
      }
      this.getsellBusines();
      this.itemdata = alldata;
      this.options = options;
    }, 500);
  },
  methods: {
    handleChange(e) {
      this.longtime1 = e
    },
    handleChanges(e) {
      this.longtime2 = e
    },
    getadminstore() {
      adminStore({
        request_data: Base64.encode(
          JSON.stringify({
            store_id: JSON.parse(localStorage.getItem("storemenu"))[0].id||"",
            p_id: getp_id()
          })
        )
      }).then(res => {
        if(res.status==2){
          this.$message({
            message:res.message,
            type:'warning'
          })
          return
        }
        this.options1 = res.data;
      });
    },
    getsellBusines(page,num) {
      let parmes = {
        page: page || this.page1,
        limit: num || this.num1,
        store_id:this.datasearch.shop,
        start_time: this.datasearch.value1?this.datasearch.value1[0]:"",
        end_time: this.datasearch.value1?this.datasearch.value1[1]:"",
        start_sub:this.datasearch.value2?this.datasearch.value2[0]:"",
        end_sub:this.datasearch.value2?this.datasearch.value2[1]:"",
        status: "",
        phone: ""
      };
      sellBusines({
        request_data: Base64.encode(JSON.stringify(parmes))
      }).then(res => {
        if(res.status==2){
          this.$message({
            message:res.message,
            type:'warning'
          })
          return
        }
        this.tableData = res.result.data
        this.totle = res.result.count
      });
    },
    handleSizeChange1(val) {
      this.num1 = val
      this.getsellBusines(this.page1,this.num1);
    },
    fenyeBtn1(e) {
      this.page1 = e;
      this.getsellBusines(this.page1,this.num1);
    },
    handleSizeChange2s(val) {
      this.num2s = val
      this.getsellConference(this.page2s,this.num2s)
    },
     fenyeBtn2s(e){
      this.page2s = e;
      this.getsellConference(this.page2s,this.num2s)
    },
     handleSizeChange2(val) {
      this.num2 = val
      this.getsellEntrance(this.page2,this.num2);
    },
    fenyeBtn2(e){
      this.page2 = e;
      this.getsellEntrance(this.page2,this.num2);
    },
     handleSizeChange3(val) {
      this.num3 = val
      this.getsellOperate(this.page3,this.num3);
    },
    fenyeBtn3(e){
      this.page3 = e;
      this.getsellOperate(this.page3,this.num3);
    },
    handleSizeChange4(val) {
      this.num4 = val
      this.getsellConsume(this.page4,this.num4);
    },
    fenyeBtn4(e){
      this.page4 = e;
      this.getsellConsume(this.page4,this.num4);
    },
    handleSizeChange5(val) {
      this.num5 = val
      this.getsellRecharge(this.page5,this.num5);
    },
    fenyeBtn5(e){
      this.page5 = e;
      this.getsellRecharge(this.page5,this.num5);
    },
     handleSizeChange6(val) {
      this.num6 = val
      this.getsellSetmeal(this.page6,this.num6);
    },
    fenyeBtn6(e){
      this.page6 = e;
      this.getsellSetmeal(this.page6,this.num6);
    },
    handleSizeChange7(val) {
      this.num7 = val
      this.getsellNotice(this.page7,this.num7);
    },
    fenyeBtn7(e){
      this.page7 = e;
      this.getsellNotice(this.page7,this.num7);
    },
    handleSizeChange8(val) {
      this.num8 = val
      this.getsellLocker(this.page8,this.num8);
    },
    fenyeBtn8(e){
      this.page8 = e;
      this.getsellLocker(this.page8,this.num8);
    },
    // chaged(e,page,num) {
    //   this.current = e
    //   this.datasearch.shop=""
    //   this.datasearch.status=""
    //   this.datasearch.value1=""
    //   if (e == 24) {
    //     this.getsellConference(page,num)
    //     this.istsd = false
    //   }
    //   if (e == 23) {
    //     this.getsellBusines(page,num);
    //     this.istsd = true
    //   }
    // },
    getsellConference(page,num){
      let parmes = {
          page: page || this.page2s,
          limit: num||this.num2s,
          store_id:this.datasearch1.shop,
          // start_time:this.datasearch1.value1[0],
          // end_time: this.datasearch1.value1[1],
          start_time: this.datasearch1.value1?this.datasearch1.value1[0]:"",
          end_time: this.datasearch1.value1?this.datasearch1.value1[1]:"",
          status: this.datasearch1.status
        };
        sellConference({
          request_data: Base64.encode(JSON.stringify(parmes))
        }).then(res => {
          if(res.status==2){
          this.$message({
            message:res.message,
            type:'warning'
          })
          return
        }
          this.tableData2 = res.result.data;
          this.totle2s = res.result.count
        })
    },
    itemclickdata(val, index) {
      this.current = val.name
      // console.log(val)
      // this.$refs['datasearch'].resetFields()
      // this.$refs['controldata'].resetFields()
      // this.$refs['operationdata'].resetFields()
      // this.$refs['consumptiondata'].resetFields()
      // this.$refs['rechargedata'].resetFields()
      // this.$refs['mealdata'].resetFields()
      // this.$refs['guidata'].resetFields()
      switch (val.name) {
        case "23":
          this.datasearch.shop=""
          this.datasearch.status=""
          this.datasearch.value1=""
          this.getsellBusines();
          this.istsd = true
          // this.$refs['datasearch'].resetFields()
          break;
        case "24":
          this.getsellConference()
          this.istsd = false
          break;
        case "25":
          this.controldata.datevalue=""
          this.controldata.phone=""
          this.getsellEntrance();
          // this.$refs['controldata'].resetFields()
          break;
        case "26":
          this.operationdata.user="",
          this.operationdata.datevalue=""
          this.getsellOperate();
          // this.$refs['operationdata'].resetFields()
          break;
        case "27":
          this.consumptiondata.shop=""
          this.consumptiondata.type=""
          this.consumptiondata.status=""
          this.consumptiondata.phone=""
          this.consumptiondata.value4=""
          this.getsellConsume();
          // this.$refs['consumptiondata'].resetFields()
          break;
        case "28":
          this.rechargedata.store_id=""
          this.rechargedata.value5=""
          this.rechargedata.paytype=""
          this.rechargedata.status=""
          this.rechargedata.phone=""
          this.getsellRecharge()
          // this.$refs['rechargedata'].resetFields()
          break;
        case "29":
          this.mealdata.value6=""
          this.mealdata.value7=""
          this.mealdata.mealname=""
          this.mealdata.phone=""
          this.getsellSetmeal();
          // this.$refs['mealdata'].resetFields()
          break;
        case "30":
          this.getsellNotice();
          break;
        case "31":
          this.guidata.shop=""
          this.guidata.value8=""
          this.guidata.phone=""
          this.getsellLocker();
          // this.$refs['guidata'].resetFields()
          break;
      }
    },
    // 门禁记录
    getsellEntrance(page,num) {
      let parmes = {
        page: page || this.page2,
        limit:num||this.num2,
        start_time:this.controldata.datevalue[0],
        end_time:this.controldata.datevalue[1],
        phone:this.controldata.phone
        };
        sellEntrance({
          request_data: Base64.encode(JSON.stringify(parmes))
        }).then(res => {
          if(res.status==2){
          this.$message({
            message:res.message,
            type:'warning'
          })
          return
        }
        this.doortableData = res.result.data;
        this.totle2 = res.result.count
        })
    },
    //操作记录
    getsellOperate(page,num) {
      let parmes = {
        page: page || this.page3,
        limit:num||this.num3
        };
        sellOperate({
          request_data: Base64.encode(JSON.stringify(parmes))
        }).then(res => {
          if(res.status==2){
          this.$message({
            message:res.message,
            type:'warning'
          })
          return
        }
        this.operationtableData = res.result.data;
        this.totle3 = res.result.count
        })
    },
    //消费记录
    getsellConsume(page,num) {
      let parmes = {
        page: page || this.page4,
        limit:num||this.num4
      };
      sellConsume({
        request_data: Base64.encode(JSON.stringify(parmes))
      }).then(res => {
        if(res.status==2){
          this.$message({
            message:res.message,
            type:'warning'
          })
          return
        }
        this.consumptiontableData = res.result.data;
        this.totle4 = res.result.count
      });
    },
    //充值记录
    getsellRecharge(page,num) {
      let parmes = {
        page: page || this.page5,
        limit:num||this.num5,
        type: this.rechargedata.paytype,
        start_time: this.rechargedata.value5[0]||'',
        end_time: this.rechargedata.value5[1]||'',
        status: this.rechargedata.status,
        phone: this.rechargedata.phone,
        store_id: this.rechargedata.store_id
      };
      sellRecharge({
        request_data: Base64.encode(JSON.stringify(parmes))
      }).then(res => {
        if(res.status==2){
          this.$message({
            message:res.message,
            type:'warning'
          })
          return
        }
        // this.mealtableData = res.result;
        this.rechargetableData = res.result.data;
        this.totle5 = res.result.count
      });
    },
    //套餐记录
    getsellSetmeal(page,num) {
      let parmes = {
        page: page || this.page6,
        limit:num||this.num6
      };
      sellSetmeal({
        request_data: Base64.encode(JSON.stringify(parmes))
      }).then(res => {
        if(res.status==2){
          this.$message({
            message:res.message,
            type:'warning'
          })
          return
        }
        this.mealtableData = res.result.data;
        this.totle6 = res.result.count
      });
    },
    // 通知记录
    getsellNotice(page,num) {
      let parmes = {
        page: page || this.page7,
        limit:num||this.num7
      };
      sellNotice({
        request_data: Base64.encode(JSON.stringify(parmes))
      }).then(res => {
        if(res.status==2){
          this.$message({
            message:res.message,
            type:'warning'
          })
          return
        }
        this.noticetableData = res.result.data;
        this.totle7 = res.result.count
      });
    },
    // 储物柜记录
    getsellLocker(page,num) {
      let parmes = {
        page: page || this.page8,
        limit:num||this.num8
      };
      sellLocker({
        request_data: Base64.encode(JSON.stringify(parmes))
      }).then(res => {
        if(res.status==2){
          this.$message({
            message:res.message,
            type:'warning'
          })
          return
        }
        this.lockertableData = res.result.data;
        this.totle8 = res.result.count
      });
    },
    handleseachs(){
      this.$confirm(`共 ${this.totle} 条数据，确定导出吗?`, "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning"
      })
        .then(() => {
                        //原先的页面条数
      var pageSize = this.num1;
      //原先的当前页数
      var num = this.page1;
      //导出所有数据的条数
      var total = this.totle;
      //判断是否有多页
      if (total > pageSize) {
        //设置导出所有数据的参数
        this.queryObj.pageNum = 1;
        this.queryObj.pageSize = total;
        //修改导出的条数
         this.pageInit(this.queryObj, true);
        //恢复原先数据
        this.queryObj.pageNum = num;
        this.queryObj.pageSize = pageSize;
         this.pageInit(this.queryObj, false);
      } else {
        this.downingExcel();
      }
      }).catch(() => {
          this.$message({
            type: "info",
            message: "已取消"
          })
        })
    },
    handleseach1() {
      this.$confirm(`共 ${this.totle2s} 条数据，确定导出吗?`, "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning"
      })
        .then(() => {
          //原先的页面条数
           var pageSize2s = this.num2s;
      var num2s = this.page2s;
      var total2s = this.totle2s;
      // console.log(pageSize2s)
      // console.log(num2s)
      // console.log(total2s)
      // return
       if (total2s > pageSize2s) {
        //设置导出所有数据的参数
        this.queryObj2s.pageNum = 1;
        this.queryObj2s.pageSize = total2s;
        //修改导出的条数
         this.pageInit2s(this.queryObj2s, true);
        //恢复原先数据
        this.queryObj2s.pageNum = num2s;
        this.queryObj2s.pageSize = pageSize2s;
         this.pageInit2s(this.queryObj2s, false);
      } else {
        this.downingExcel2s();
      }
      }).catch(() => {
          this.$message({
            type: "info",
            message: "已取消"
          })
        })
    },
     async pageInit(data, flag) {
       let parmes = {
            page: data.pageNum,
            store_id: this.datasearch.shop,
            // store_id: this.datasearch.shop.join(","),
            start_time: this.datasearch.value1?this.datasearch.value1[0]:"",
            end_time: this.datasearch.value1?this.datasearch.value1[1]?this.datasearch.value1[1]:"":"",
            start_sub:this.datasearch.value2?this.datasearch.value2[0]:"",
            end_sub:this.datasearch.value2?this.datasearch.value2[1]:"",
            status: this.datasearch.status,
            phone: this.datasearch.phone||"",
            limit:data.pageSize
       }
      await sellBusines({
        request_data: Base64.encode(JSON.stringify(parmes))
      }).then(res => {
        if(res.status==2){
          this.$message({
            message:res.message,
            type:'warning'
          })
          return
        }
        this.tableData = res.result.data
        this.totle = res.result.count
      });
      if (flag) {
        await this.downingExcel();
      }
    },
     async pageInit2s(data, flag) {
       let parmes = {
            page: data.pageNum,
            store_id: this.datasearch.shop,
            // store_id: this.datasearch.shop.join(","),
            start_time: this.datasearch.value1?this.datasearch.value1[0]:"",
            end_time: this.datasearch.value1?this.datasearch.value1[1]?this.datasearch.value1[1]:"":"",
            status: this.datasearch.status,
            phone: this.datasearch.phone||"",
            limit:data.pageSize
       }
      await sellConference({
        request_data: Base64.encode(JSON.stringify(parmes))
      }).then(res => {
        if(res.status==2){
          this.$message({
            message:res.message,
            type:'warning'
          })
          return
        }
        this.tableData2 = res.result.data;
        this.totle2s = res.result.count
        // this.searchpopup = false;
      });
      if (flag) {
        await this.downingExcel2s();
      }
    },
    downingExcel() {
      // outputFile() {
        var ws1 = XLSX.utils.table_to_book(document.querySelector('#Table1'),{ raw: true });//对应要导出的表格id

        /* get binary string as output */
        var wbOut = XLSX.write(ws1, {
          bookType: "xlsx",
          bookSST: true,
          type: "array"
        });
        try {
          FileSaver.saveAs(
                  new Blob([wbOut], { type: "application/octet-stream" }),
                  "download.xlsx"
          );
        } catch (e) {
          if (typeof console !== "undefined");
        }
        return wbOut;
    },
    downingExcel2s() {
      // outputFile() {
        var ws1 = XLSX.utils.table_to_book(document.querySelector('#Table2'),{ raw: true });//对应要导出的表格id

        /* get binary string as output */
        var wbOut = XLSX.write(ws1, {
          bookType: "xlsx",
          bookSST: true,
          type: "array"
        });
        try {
          FileSaver.saveAs(
                  new Blob([wbOut], { type: "application/octet-stream" }),
                  "download.xlsx"
          );
        } catch (e) {
          if (typeof console !== "undefined");
        }
        return wbOut;
    },
    handleseach2() {
      this.$confirm(`共 ${this.totle4} 条数据，确定导出吗?`, "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning"
      })
        .then(() => {
            //原先的页面条数
      var pageSize4 = this.num4;
      //原先的当前页数
      var num4 = this.page4;
      //导出所有数据的条数
      var total4 = this.totle4;
      //判断是否有多页
      if (total4 > pageSize4) {
        //设置导出所有数据的参数
        this.queryObj2.pageNum = 1;
        this.queryObj2.pageSize = total4;
        //修改导出的条数
         this.pageInit4(this.queryObj2, true);
        //恢复原先数据
        this.queryObj2.pageNum = num4;
        this.queryObj2.pageSize = pageSize4;
         this.pageInit4(this.queryObj2, false);
      } else {
        this.downingExcel4();
      }
      })
        .catch(() => {
          this.$message({
            type: "info",
            message: "已取消"
          })
        })
      //  sellConUpload().then(res => {
      //   if(res.status==2){
      //     this.$message({
      //       message:res.message,
      //       type:'warning'
      //     })
      //     return
      //   }
      //   this.$message({
      //     message:res.message,
      //     type:"success"
      //   })
      // });
    },
    async pageInit4(data, flag) {
      let parmes = {
        page: data.pageNum,
        // type: this.consumptiondata.type,
        // start_time: this.consumptiondata.value4[0]||'',
        // end_time: this.consumptiondata.value4[1]||'',
        // status: this.consumptiondata.status,
        // phone: this.consumptiondata.phone,
        // store_id: this.consumptiondata.shop,
        limit:data.pageSize
      };
      await sellConsume({
        request_data: Base64.encode(JSON.stringify(parmes))
      }).then(res => {
        if(res.status==2){
          this.$message({
            message:res.message,
            type:'warning'
          })
          return
        }
        this.consumptiontableData = res.result.data;
        this.totle4 = res.result.count
      });
      if (flag) {
        await this.downingExcel4();
      }
    },
    downingExcel4() {
     // outputFile() {
      var ws1 = XLSX.utils.table_to_book(document.querySelector('#Table4'),{ raw: true });//对应要导出的表格id

/* get binary string as output */
var wbOut = XLSX.write(ws1, {
  bookType: "xlsx",
  bookSST: true,
  type: "array"
});
try {
  FileSaver.saveAs(
          new Blob([wbOut], { type: "application/octet-stream" }),
          "download.xlsx"
  );
} catch (e) {
  if (typeof console !== "undefined");
}
return wbOut;
    },
    handleseach3() {
      this.$confirm(`共 ${this.totle5} 条数据，确定导出吗?`, "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning"
      })
        .then(() => {
            //原先的页面条数
      var pageSize5 = this.num5;
      //原先的当前页数
      var num5 = this.page5;
      //导出所有数据的条数
      var total5 = this.totle5;
      //判断是否有多页
      if (total5 > pageSize5) {
        //设置导出所有数据的参数
        this.queryObj3.pageNum = 1;
        this.queryObj3.pageSize = total5;
        //修改导出的条数
         this.pageInit5(this.queryObj3, true);
        //恢复原先数据
        this.queryObj3.pageNum = num5;
        this.queryObj3.pageSize = pageSize5;
         this.pageInit5(this.queryObj3, false);
      } else {
        this.downingExcel5();
      }
      })
        .catch(() => {
          this.$message({
            type: "info",
            message: "已取消"
          })
        })
      //  sellReaUpload().then(res => {
      //   if(res.status==2){
      //     this.$message({
      //       message:res.message,
      //       type:'warning'
      //     })
      //     return
      //   }
      //   this.$message({
      //     message:res.message,
      //     type:"success"
      //   })
      // });
    },
    async pageInit5(data, flag) {
      let parmes = {
        page: data.pageNum,
        type: this.rechargedata.paytype,
        start_time: this.rechargedata.value5[0]||'',
        end_time: this.rechargedata.value5[1]||'',
        status: this.rechargedata.status,
        phone: this.rechargedata.phone,
        store_id: this.rechargedata.store_id,
        limit:data.pageSize
      };
      await sellRecharge({
        request_data: Base64.encode(JSON.stringify(parmes))
      }).then(res => {
        if(res.status==2){
          this.$message({
            message:res.message,
            type:'warning'
          })
          return
        }
        this.rechargetableData = res.result.data;
        this.totle5 = res.result.count
      });
      if (flag) {
        await this.downingExcel5();
      }
    },
    downingExcel5() {
      // outputFile() {
        var ws1 = XLSX.utils.table_to_book(document.querySelector('#Table5'),{ raw: true });//对应要导出的表格id

        /* get binary string as output */
        var wbOut = XLSX.write(ws1, {
          bookType: "xlsx",
          bookSST: true,
          type: "array"
        });
        try {
          FileSaver.saveAs(
                  new Blob([wbOut], { type: "application/octet-stream" }),
                  "download.xlsx"
          );
        } catch (e) {
          if (typeof console !== "undefined");
        }
        return wbOut;
    },
    handleseach4(){
      this.$confirm(`共 ${this.totle6} 条数据，确定导出吗?`, "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning"
      })
        .then(() => {
            //原先的页面条数
      var pageSize6 = this.num6;
      //原先的当前页数
      var num6 = this.page6;
      //导出所有数据的条数
      var total6 = this.totle6;
      //判断是否有多页
      if (total6 > pageSize6) {
        //设置导出所有数据的参数
        this.queryObj4.pageNum = 1;
        this.queryObj4.pageSize = total6;
        //修改导出的条数
         this.pageInit6(this.queryObj4, true);
        //恢复原先数据
        this.queryObj4.pageNum = num6;
        this.queryObj4.pageSize = pageSize6;
         this.pageInit6(this.queryObj4, false);
      } else {
        this.downingExcel6();
      }
      })
        .catch(() => {
          this.$message({
            type: "info",
            message: "已取消"
          })
        })
    },
    async pageInit6(data, flag) {
      let parmes = {
        page: data.pageNum,
        set_meal: this.mealdata.mealname,
        start_time: this.mealdata.value6[0]||'',
        end_time: this.mealdata.value6[1]||'',
        sub_start_time: this.mealdata.value7[0]||'',
        sub_end_time: this.mealdata.value7[1]||'',
        phone: this.mealdata.phone,
        limit:data.pageSize
      };
      await sellSetmeal({
        request_data: Base64.encode(JSON.stringify(parmes))
      }).then(res => {
        if(res.status==2){
          this.$message({
            message:res.message,
            type:'warning'
          })
          return
        }
        this.mealtableData = res.result.data;
        this.totle6 = res.result.count
      });
      if (flag) {
        await this.downingExcel6();
      }
    },
    downingExcel6() {
      // outputFile() {
        var ws1 = XLSX.utils.table_to_book(document.querySelector('#Table6'),{ raw: true });//对应要导出的表格id

        /* get binary string as output */
        var wbOut = XLSX.write(ws1, {
          bookType: "xlsx",
          bookSST: true,
          type: "array"
        });
        try {
          FileSaver.saveAs(
                  new Blob([wbOut], { type: "application/octet-stream" }),
                  "download.xlsx"
          );
        } catch (e) {
          if (typeof console !== "undefined");
        }
        return wbOut;
    },
    cancelorder(data) {
      this.$confirm("确定取消订单吗?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning"
      })
        .then(() => {
          sellCancel({
            request_data: Base64.encode(JSON.stringify({ id: data.id }))
          }).then(res => {
            if(res.status==2){
          this.$message({
            message:res.message,
            type:'warning'
          })
          return
        }
            this.$message({
              type: "success",
              message: res.message
            });
            this.getsellBusines();
          });
        })
        .catch(() => {
          this.$message({
            type: "info",
            message: "已取消"
          });
        });
    },
    aloneorder(data) {
      this.id1 = data.id
      this.extendedpopup = true
      this.extendeddata = data;
    },
    extendedorder(data) {
      this.id2 = data.room_id
      this.extendedpopups = true
      this.extendeddatas = data
    },
    cancelstall(data){
       this.$confirm("该取消订单无退款，是否确认取消订单！", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning"
      })
        .then(() => {
          roomCancel({
            request_data: Base64.encode(JSON.stringify({ room_id: data.room_id }))
          }).then(res => {
            if(res.status==2){
          this.$message({
            message:res.message,
            type:'warning'
          })
          return
        }
            this.$message({
              type: "success",
              message: res.message
            });
            this.getsellConference()
          });
        })
        .catch(() => {
          this.$message({
            type: "info",
            message: "已取消"
          });
        });
    },
    beforestop(data) {
      this.id1 = data.id
      this.stoppopup = true;
      this.stopdata = data;
    },
    bindstall(data) {
      this.id2 = data.room_id
      this.stoppopups = true;
      this.stopdatas = data;
    },
    logon(data) {
      // this.logonpopup = true
      this.$confirm("确定签退吗?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning"
      })
        .then(() => {
          sellSignout({
            request_data: Base64.encode(JSON.stringify({ id: data.id }))
          }).then(res => {
            if(res.status==2){
          this.$message({
            message:res.message,
            type:'warning'
          })
          return
        }
            this.$message({
              type: "success",
              message: res.message
            });
            this.getsellBusines();
          });
        })
        .catch(() => {
          this.$message({
            type: "info",
            message: "已取消"
          });
        });
    },
    signout(data) {
      // this.logonpopup = true
      this.$confirm("确定签退吗?", "提示", {
        confirmButtonText: "确定",
        cancelButtonText: "取消",
        type: "warning"
      })
        .then(() => {
          roomConference({
            request_data: Base64.encode(JSON.stringify({ room_id: data.room_id }))
          }).then(res => {
            if(res.status==2){
          this.$message({
            message:res.message,
            type:'warning'
          })
          return
        }
            this.$message({
              type: "success",
              message: res.message
            });
            this.getsellConference()
          });
        })
        .catch(() => {
          this.$message({
            type: "info",
            message: "已取消"
          });
        });
    },
    submitFormextendeddata() {
       sellExtend({
            request_data: Base64.encode(JSON.stringify({ id: this.id1,time:this.longtime1 }))
          }).then(res => {
            if(res.status==2){
          this.$message({
            message:res.message,
            type:'warning'
          })
          return
        }
            this.$message({
              type: "success",
              message: res.message
            });
            this.extendedpopup = false
            this.getsellBusines()
          });
    },
    submitFormextendeddatas() {
       roomExtend({
            request_data: Base64.encode(JSON.stringify({ room_id: this.id2,time:this.longtime2 }))
          }).then(res => {
            if(res.status==2){
          this.$message({
            message:res.message,
            type:'warning'
          })
          return
        }
            this.$message({
              type: "success",
              message: res.message
            });
            this.extendedpopups = false
            this.getsellConference()
          });
    },
    resetForm(formName) {
      this.$refs[formName].resetFields();
    },
    submitFormdatasearch() {
          let parmes = {
            page: 1,
            store_id: this.datasearch.shop,
            start_time: this.datasearch.value1?this.datasearch.value1[0]:"",
            end_time: this.datasearch.value1?this.datasearch.value1[1]:"",
            start_sub:this.datasearch.value2?this.datasearch.value2[0]:"",
            end_sub:this.datasearch.value2?this.datasearch.value2[1]:"",
            status: this.datasearch.status,
            limit: this.num1
          }
          sellBusines({
            request_data: Base64.encode(JSON.stringify(parmes))
          }).then(res => {
            if(res.status==2){
          this.$message({
            message:res.message,
            type:'warning'
          })
          return
        }
            this.tableData = res.result.data;
            this.totle = res.result.count
            this.searchpopup = false;
          })
    },
    submitFormdatasearch1() {
      let parmes = {
        page: 1,
        store_id: this.datasearch1.shop,
        start_time: this.datasearch1.value1?this.datasearch1.value1[0]:"",
        end_time: this.datasearch1.value1?this.datasearch1.value1[1]:"",
        status: this.datasearch1.status,
        limit: this.num2s
      }
      sellConference({
        request_data: Base64.encode(JSON.stringify(parmes))
      }).then(res => {
        if(res.status==2){
      this.$message({
        message:res.message,
        type:'warning'
      })
      return
    }
        this.tableData2 = res.result.data;
        this.totle2s = res.result.count
        this.searchpopup1 = false;
      })
    },
    submitFormcontrolsearchpopup(formName) {
      // this.$refs[formName].validate(valid => {
      //   if (valid) {
          sellEntrance({
            page: 1,
            limit:10,
            start_time:this.controldata.datevalue?this.controldata.datevalue[0]:"",
            end_time:this.controldata.datevalue?this.controldata.datevalue[1]:"",
            phone:this.controldata.phone
          }).then(res => {
            if(res.status==2){
              this.$message({
                message:res.message,
                type:'warning'
            })
            return
          }
          this.doortableData = res.result.data;
          this.controlsearchpopup = false;
          });
      //   } else {
      //     return false;
      //   }
      // });
    },
    submitFormguipopup(formName) {
      let parmes = {
        page: 1,
        limit:10,
        store_id: this.guidata.shop,
        phone: this.guidata.phone,
        start_time: this.guidata.value8?this.guidata.value8[0]:"",
        end_time: this.guidata.value8?this.guidata.value8[1]:""
      };
      sellLocker({
        request_data: Base64.encode(JSON.stringify(parmes))
      }).then(res => {
        if(res.status==2){
          this.$message({
            message:res.message,
            type:'warning'
          })
          return
        }
        this.guipopup = false;
        this.lockertableData = res.result.data;
      });
    },
    submitFormoperationsearchpopup() {
      sellOperate({
        page: 1,
        limit:10,
        user_name: this.operationdata.user,
        start_time: this.operationdata.datevalue?this.operationdata.datevalue[0]:"",
        end_time: this.operationdata.datevalue?this.operationdata.datevalue[1]:""
      }).then(res => {
         if(res.status==2){
          this.$message({
            message:res.message,
            type:'warning'
          })
          return
        }
        this.operationtableData = res.result.data;
        this.operationsearchpopup = false;
      });
    },
    submitFormconsumptiondata() {
      let parmes = {
        page: 1,
        type: this.consumptiondata.type,
        start_time: this.consumptiondata.value4?this.consumptiondata.value4[0]:'',
        end_time: this.consumptiondata.value4?this.consumptiondata.value4[1]:'',
        status: this.consumptiondata.status,
        phone: this.consumptiondata.phone,
        store_id: this.consumptiondata.shop,
        limit: this.num4
      };
      sellConsume({
        request_data: Base64.encode(JSON.stringify(parmes))
      }).then(res => {
        if(res.status==2){
          this.$message({
            message:res.message,
            type:'warning'
          })
          return
        }
        this.consumptionpopup = false;
        this.totle4 = res.result.count
        this.consumptiontableData = res.result.data;
      });
    },
    submitFormrechargedata() {
      let parmes = {
        page: 1,
        type: this.rechargedata.paytype,
        start_time: this.rechargedata.value5?this.rechargedata.value5[0]:'',
        end_time: this.rechargedata.value5?this.rechargedata.value5[1]:'',
        status: this.rechargedata.status,
        phone: this.rechargedata.phone,
        store_id: this.rechargedata.store_id,
        limit: this.num5
      };
      sellRecharge({
        request_data: Base64.encode(JSON.stringify(parmes))
      }).then(res => {
        if(res.status==2){
          this.$message({
            message:res.message,
            type:'warning'
          })
          return
        }
        // this.mealtableData = res.result;
        this.rechargepopup = false;
        this.totle5 = res.result.count
        this.rechargetableData = res.result.data;
      })
    },
    submitFormmealdata() {
      let parmes = {
        page: 1,
        set_meal: this.mealdata.mealname,
        start_time: this.mealdata.value6?this.mealdata.value6[0]:"",
        end_time: this.mealdata.value6?this.mealdata.value6[1]:"",
        sub_start_time: this.mealdata.value7?this.mealdata.value7[0]:"",
        sub_end_time: this.mealdata.value7?this.mealdata.value7[1]:"",
        phone: this.mealdata.phone,
        limit: this.num6
      };
      sellSetmeal({
        request_data: Base64.encode(JSON.stringify(parmes))
      }).then(res => {
        if(res.status==2){
          this.$message({
            message:res.message,
            type:'warning'
          })
          return
        }
        this.mealpopup = false;
        this.totle6 = res.result.count
        this.mealtableData = res.result.data;
      });
    },
    submitFormlogondata() {
      // this.logonpopup = false;
    },
    submitFormstopdata() {
      let parmes = {
        id: this.id1
      }
      sellEnd({
        request_data: Base64.encode(JSON.stringify(parmes))
      }).then(res => {
        if(res.status==2){
          this.$message({
            message:res.message,
            type:'warning'
          })
          return
        }
        this.stoppopup = false;
        this.getsellBusines()
      });
    },
    submitFormstopdatas() {
      let parmes = {
        room_id: this.id2
      }
      roomEnd({
        request_data: Base64.encode(JSON.stringify(parmes))
      }).then(res => {
        if(res.status==2){
          this.$message({
            message:res.message,
            type:'warning'
          })
          return
        }
        this.stoppopups = false;
        this.getsellConference()
      });
    },
    guisearch() {
      this.guipopup = true;
    },
    dataanalysis() {
      let parmes = {
        store_id:JSON.parse(localStorage.getItem("storemenu"))[0].id||"",
        page: 1
      };
      sellAnalyse({
        request_data: Base64.encode(JSON.stringify(parmes))
      }).then(res => {
        if(res.status==2){
          this.$message({
            message:res.message,
            type:'warning'
          })
          return
        }
        this.analysisData = res.result
      });
      this.analysispopup = true;
    },
     dataanalysis1() {
      let parmes = {
        store_id:JSON.parse(localStorage.getItem("storemenu"))[0].id||"",
        page: 1
      };
      sellConAnalysis({
        request_data: Base64.encode(JSON.stringify(parmes))
      }).then(res => {
        if(res.status==2){
          this.$message({
            message:res.message,
            type:'warning'
          })
          return
        }
        this.analysisData = res.result
      });
      this.analysispopup = true;
    },
     rechargeanalysis() {
      let parmes = {
        store_id:JSON.parse(localStorage.getItem("storemenu"))[0].id||"",
        page: 1
      };
      sellReaAnalysis({
        request_data: Base64.encode(JSON.stringify(parmes))
      }).then(res => {
        if(res.status==2){
          this.$message({
            message:res.message,
            type:'warning'
          })
          return
        }
        this.rechargeanalysisData = res.result
      });
      this.rechargeanalysispopup = true;
    },
    mealsearch() {
      this.mealpopup = true;
    },
    consumptionment() {
      this.consumptionpopup = true;
    },
    handleseach() {},
    rechargesearch() {
      this.rechargepopup = true;
    },
    // rechargeanalysis() {
    //   this.rechargeanalysispopup = true;
    // },
    controlhandleseach() {
      this.controlsearchpopup = true;
    },
    appointmentseach() {
      this.searchpopup = true;
    },
    appointmentseach1() {
      this.searchpopup1 = true;
    },
    operationsearch() {
      this.operationsearchpopup = true;
    },
    // handclose(){
    //   this.$refs['rechargedata'].resetFields()
    // }
  }
};
</script>
<style lang="scss" scoped>
::v-deep .el-tabs__item.is-active{
  padding-left: 20px !important;

}
::v-deep .el-tabs__active-bar{
  padding-left: 20px !important;

}
::v-deep .el-tabs--bottom .el-tabs__item.is-bottom:nth-child(2), .el-tabs--bottom .el-tabs__item.is-top:nth-child(2), .el-tabs--top .el-tabs__item.is-bottom:nth-child(2), .el-tabs--top .el-tabs__item.is-top:nth-child(2){
  padding-left: 20px !important;

}
::v-deep .el-tabs--bottom .el-tabs__item.is-bottom:nth-child(2){
  padding-left: 20px !important;

}
::v-deep .el-tabs--bottom .el-tabs__item.is-top:nth-child(2){
  padding-left: 20px !important;

}
::v-deep .el-tabs--top .el-tabs__item.is-bottom:nth-child(2){
  padding-left: 20px !important;

}
::v-deep .el-tabs--top .el-tabs__item.is-top:nth-child(2) {
  padding-left: 20px !important;
}
.el-table .cell {
  display: flex !important;
  align-items: center !important;
}
.items {
  margin-left: 40px;
}
.line {
  text-align: center;
}
.box1 {
  margin-bottom: 24px;
}
.el-dialog__body {
  text-align: center;
}
.inpts {
  background-color: #fff;
  background-image: none;
  border-radius: 4px;
  border: 1px solid #dcdfe6;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
  display: inline-block;
  font-size: inherit;
  height: 40px;
  line-height: 40px;
  outline: 0;
  padding: 0 15px;
  -webkit-transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
  transition: border-color 0.2s cubic-bezier(0.645, 0.045, 0.355, 1);
  width: 98%;
  color: #409eff;
  font-size: 12px;
  padding-left: 16px;
}
.contbox {
  width: 100%;
  height: auto;
  margin-top: 24px;
  margin-left: 20px;
}
.tit1 {
  border-bottom: 1px solid #f0f2f5;
  width: 100%;
  padding-bottom: 12px;
  margin-bottom: 12px;
}
.tx1 {
  margin-left: 10px;
  margin-right: 16px;
  color: #010101;
  font-size: 16px;
}
.el-table td,
.el-table th {
  padding-left: 10px;
}
.tx2 {
  color: #afafaf;
  font-size: 12px;
}
::v-deep .el-tabs__header {
  margin-bottom: 0px;
}
.section10 {
  z-index: 103;
  height: 40px;
  border: 1px solid rgba(240, 242, 245, 1);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.mod2 {
  width: 569px;
  height: 40px;
  display: flex;
  cursor: pointer;
}
.optionitems {
  // width: 98px;
  // height: 40px;
  padding: 0 10px;
  background: #ffffff;
  border-right: 1px solid #f0f2f5;
  border-bottom: 1px solid #f0f2f5;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #409eff;
  font-size: 14px;
}
.optionitems:nth-child(1) {
  border-left: none;
}
.optionitem {
  color: rgba(51, 51, 51, 1);
  // width: 98px;
  // height: 40px;
  padding: 0 10px;
  display: flex;
  border-right: 1px solid #f0f2f5;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}
.nomolview{
  margin-bottom:20px;
  width: 100%;
}
.scrview{
  width: 100%;
  height:auto;
  margin-bottom:20px;
  overflow-y: scroll;
}
</style>
